package com.nlecloud.bc.service.contract;

import org.fisco.bcos.sdk.transaction.model.exception.ContractException;

import java.math.BigInteger;

/**
 * 账户合约操作服务接口声明
 */
public interface IUserContractService {

    /**
     * 设置账户余额
     * @param userId 用户Id
     * @param amount 余额
     * @return
     */
    boolean setBalance(String userId,String amount);

    /**
     * 获取账户余额
     * @param userId 用户Id
     * @return
     * @throws ContractException
     */
    BigInteger getBalance(String userId) throws ContractException;

    /**
     * 交易转账
     * @param uuid 版权存证信息ID
     * @param userId 购买方ID
     * @return
     */
    boolean transfer(String uuid,String userId);
}
